<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.db.conn"%>
<%@ page import="java.sql.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
<jsp:include flush="true" page="${basePath}/admin/head.jsp"></jsp:include>

<script src="<%=path %>/admin/js/jquery.js" type="text/javascript"></script>
<script src="<%=path %>/admin/js/formValidator.js" type="text/javascript"></script>  
<script src="<%=path %>/admin/js/formValidatorRegex.js" type="text/javascript"></script>
<link href="<%=path %>/admin/css/validator.css" rel="stylesheet" type="text/css" />



 </head>

 <body class="ms-body ms-aside-left-open ms-primary-theme ms-has-quickbar">
    <!-- Body Content Wrapper -->
    <div class="ms-content-wrapper">
        <div class="row">
            <div class="col-md-12">
                   <div class="ms-panel">
        <div class="ms-panel-header ms-panel-custome">
            <h6>编辑小说类别信息</h6>
        </div>
        <div class="ms-panel-body">
            <div class="table-responsive">
                <table id="data-table10" class="table w-100 thead-primary">
                    <tr>
                        <td>
						<form  action="<%=path %>/category_Edit" method="post">
		 <table style="width:100%;" id="ctl001">
        <% 			conn cn=new conn();
    
     			String id = request.getParameter("id");
				String sql = "select * from category where caid=" + id ;
				ResultSet rs = cn.query(sql);
				rs.next();
			%>
<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>类别名称:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_caname" type="text" id="txt_caname" style="width: 200px; "  value='<%= rs.getString("caname") %>' /></div><div id="txt_canameTip" style="width:250px;display:inline;float:left;text-align:left;"></div>
 </td></tr>



    <tr>
        <td>&nbsp;</td>
        <td align="left">
	    <input name="id" type="hidden" id="id" value='<%= request.getParameter("id") %>'> 
        <input type="submit" name="btnAdd" value="编 辑" onclick="return jQuery.formValidator.PageIsValid('1');" id="btnAdd"  class="btn"  />
    <input name="btnReturn" type="button" value="返 回"  class="btn"  onclick="location.href='<%=path %>/admin/category/category_Manage.jsp';"  />
            </td>
    </tr>
</table>
	<%
				if (rs != null)
					rs.close();
				if (cn != null)
					cn.close();
			%>
           </form>
	<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        $.formValidator.initConfig({ onError: function(msg) { alert(msg) } });
        $("#txt_caname").formValidator({ onshow: "请输入类别名称", onfocus: "类别名称不能为空", oncorrect: "合法" }).InputValidator({ min: 1, onerror: "类别名称不能为空,请确认" });
    });
</script>


                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

            </div>
        </div>
    </div>

</body>
</html>

